<!DOCTYPE html>
<head>
	<meta charset="utf-8">
	<title>角色列表--layui后台管理模板 2.0</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
	<link rel="stylesheet" href="/layui/css/layui.css" media="all" />
	<link rel="stylesheet" href="/css/public.css" media="all" />
</head>
<body class="childrenBody">
<div class="gray-bg">
<div class="layui-fluid">
	<div class="layui-row layui-col-space10">
		<div class="layui-col-sm12 layui-col-md12 layui-col-lg12" id="searchDiv">
			<div class="layui-card smooth">
				<div class="layui-card-body">
					<form class="layui-form" lay-filter="form-role-filter">
						<div class="layui-form toolbar">
							<div class="layui-form-item">
								<div class="layui-inline">
									<label class="layui-form-label">角色名称：</label>
									<div class="layui-input-inline">
										<input name="roleName" type="text" class="layui-input" autocomplete="off"/>
									</div>
								</div>
								<div class="layui-inline">
									<label class="layui-form-label">权限字符：</label>
									<div class="layui-input-inline">
										<input name="roleKey" type="text" class="layui-input" autocomplete="off"/>
									</div>
								</div>
								<div class="layui-inline">
									<label class="layui-form-label">状态：</label>
									<div class="layui-input-inline">
										<select name="status">
										<option value="1">开启</option>
											<option value="0">禁用</option>
										</select>
									</div>
								</div>
								<div class="layui-row" style="text-align: right">
									<button id="btnSearch" lay-submit class="layui-btn" data-type="reload"><i class="layui-icon">&#xe615;</i>搜索
									</button>
									<button  type="reset" class="layui-btn"><i class="layui-icon">&#xe669;</i>重置
									</button>
								</div>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
		<div class="layui-col-sm12 layui-col-md12 layui-col-lg12">
			<div class="layui-card">
				<div class="layui-card-body">
					<table id="table_role" lay-filter="tableRole">
					</table>
					<script type="text/html" id="col_operation">
						<@shiro.hasPermission name="system:role:edit">
						<a class="layui-btn layui-btn-xs" href="javascript:;" lay-event="edit"><i class="fa fa-edit"></i>编辑</a>
						</@shiro.hasPermission >
						<@shiro.hasPermission name="system:role:remove">
						<a  class="layui-btn layui-btn-xs" href="javascript:;" lay-event="del"><i class="fa fa-remove"></i>删除</a>
						</@shiro.hasPermission >
					</script>
					<script type="text/html" id="tmplRoleStatus">
						{{#  if(d.status == 1){ }}
						<input type="checkbox" lay-filter="filter-switchRoleStatus" value="{{d.id}}" name="switchRoleStatus" lay-skin="switch" checked>
						{{#  } else { }}
						<input type="checkbox" lay-filter="filter-switchRoleStatus" value="{{d.id}}" name="switchRoleStatus" lay-skin="switch">
						{{#  } }}
					</script>
					<script type="text/html" id="table_role_toolbar">
						<div class="layui-btn-group" >
							<button  class="layui-btn layui-btn-sm" lay-event="toolbar-role-add" ><i class="layui-icon">&#xe654;</i>新增</button>
							<button  class="layui-btn layui-btn-sm" lay-event="toolbar-role-remove" ><i class="layui-icon">&#xe640;</i>删除</button>
							<button id="btnExp" class="layui-btn layui-btn-sm"><i class="layui-icon">&#xe67d;</i>导出</button>
						</div>
					</script>
				</div>
			</div>
		</div>
	</div>
</div>
</div>
<script type="text/javascript" src="/layui/polyfill.min.js"></script>
<script type="text/javascript" src="/layui/layui.js"></script>
<script type="text/javascript" src="/layui/swotadmin.js"></script>
<script type="text/javascript">
    var prefix = "/system/role";
</script>
<script>
    layui.config({
        base:'/js/system/role/'
    }).use(['role_list'], function(){
        var role = layui.role_list;
        role.init({
            "prefix":prefix

        });
    });
</script>

</body>
</html>